package ans.p137;

/**
 * #      137
 * 名称   只出现一次的数字 II
 * 链接   https://leetcode-cn.com/problems/single-number-ii
 * 题解   [361](https://leetcode-cn.com/problems/single-number-ii/solution)
 * 通过率 68.7%
 * 难道   中等
 */
//todo 研读
class Solution {
    public int singleNumber(int[] nums) {
        int a=0,b=0;
        for(int num:nums){
            a = ~b&(a^num);
            b = ~a&(b^num);
        }
        return a;
    }
}